
public class ComplexeCar2 implements Complexe {
	private double x, y;

	public ComplexeCar2(double x, double y) {
		this.x = x;
		this.y = y;
	}

	public ComplexeCar2(double rho, Angle theta)
	{
		x = Conversion.x(rho, theta);
		y = Conversion.y(rho, theta);
	}

	@Override
	public double getX()
	{
		return x;
	}

	@Override
	public double getY() {
		return y;
	}

	@Override
	public double getRho() {
		return Conversion.rho(x,  y);
	}

	@Override
	public Angle getTheta() {
		return Conversion.theta(x,  y);
	}

	@Override
	public Complexe creer(double x, double y) {
		return new ComplexeCar2(x, y);
	}

	@Override
	public Complexe creer(double rho, Angle theta) {
		return new ComplexeCar2(rho, theta);
	}

}
